// Lang_35 [primitive implicit casts].nova // The application class. class PrimitiveImplicitCastsApp { // Application class's "main" function. public static void main( String[] args ) { byte b = 128; short s = 128; int i; // Implicitly cast the result to an "int" type. i = b + b; Stream.writeLine( Integer.toString( i ) ); // Implicitly cast the left operand to a "short" type. // Then implicitly cast the result to an "int" type. i = b + s; Stream.writeLine( Integer.toString( i ) ); // Implicitly cast the right operand to a "short" type. // Then implicitly cast the result to an "int" type. i = s + b; Stream.writeLine( Integer.toString( i ) ); } }